package com.qf.bigwork.view;

import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.WindowManager;

import com.qf.bigwork.R;
//详情页
public class DetailsActivity extends AppCompatActivity {

    private Toolbar tb;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_details);
        initWindow();
        initView();
        toolbarView();
    }
    private void initWindow() {
        //使状态栏透明
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }
    }
    private void toolbarView() {
        tb.inflateMenu(R.menu.menu_details);
        tb.setNavigationIcon(R.mipmap.ic_launcher);
    }

    private void initView() {
        tb= (Toolbar) findViewById(R.id.detial_act_tb);
    }
}
